/*
 */
#include <acess.h>
#include <tpl_drv_common.h>

// === GLOBALS ===
static char	*ssaCalls_Common[] = {"get type", "ident", "version", "lookup"};

static char *ssaCalls_Keyboard[] = {"repeat rate", "repeat delay"};

// === CODE ===
int GetIOCtlId(int Class, char *Name)
{
	 int	i, size;
	char	**list;
	for(i=0;i<SIZEOF_ARR(ssaCalls_Common);i++)
		if(strcmp(Name, ssaCalls_Common[i]) == 0)
			return i;
	
	switch(Class)
	{
	case DRV_TYPE_KEYBOARD:
		list = ssaCalls_Keyboard;
		size = SIZEOF_ARR(ssaCalls_Keyboard);
		break;
	default:
		return -1;
	}
	
	for(i=0;i<size;i++)
		if(strcmp(Name, list[i]) == 0)
			return 4+i;
	
	return -1;
}
